<?php


namespace app\admin\model;


use think\Model;

class PartnerAdmin extends Model
{
    //自动写入时间
    protected $autoWriteTimestamp = true;

    /**
     * 时间格式化
     * @var string
     */
    protected $dateFormat = 'Y-m-d H:i:s';

    protected $type = [
        'logintime' => 'timestamp'
    ];
    /**
     * 隐藏某些字段展示
     * @var array
     */
    protected $hidden = [
        'password',
        'salt',
    ];

    public function Partner()
    {
        return $this->hasOne('Partner', 'id', 'partner_id')->bind(['partner_name' => 'name']);
    }

}